package com.github.microwww.upms.vo;

import com.github.microwww.upms.domain.*;
import java.util.*;
import java.util.stream.Collectors;

public abstract class UserValue {

    public static class Simple extends AbstractDomainValue<User> {

        public Simple(User domain) {
            super(domain);
        }

        public Date getCreateTime() {
            return super.domain.getCreateTime();
        }

        public int getId() {
            return super.domain.getId();
        }
    }

    public static class Info extends Simple {

        public Info(User domain) {
            super(domain);
        }
    }

    public static class More extends Info {

        public More(User domain) {
            super(domain);
        }

        public List<WebappUserValue.Simple> getWebappUsers() {
            List<WebappUser> list = super.domain.getWebappUsers();
            return list.stream().map(WebappUserValue.Simple::new).collect(Collectors.toList());
        }
    }
}
